package com.ws.shop.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.ws.shop.dao.PackagzDao;
import com.ws.shop.entity.Packagz;
import com.ws.shop.service.PackagzService;
@Service(value="packagzService")
public class PackagzServiceImpl implements PackagzService {
	@Resource(name="packagzDao")
	private PackagzDao packagzDao;
	
	@Transactional(propagation=Propagation.NOT_SUPPORTED,readOnly=true)
	public List<Packagz> findListAll() {
		return packagzDao.findListAll();
	}

	@Transactional(propagation=Propagation.NOT_SUPPORTED,readOnly=true)
	public Packagz findPackagzById(int id) {
		return packagzDao.findPackagzById(id);
	}

	@Transactional(rollbackFor=Exception.class)
	public void saveOrUpdate(Packagz packagz) {
		packagzDao.saveOrUpdate(packagz);
	}

}
